package pathFinder
{
	import de.polygonal.ds.Comparable;

	public class BaseTile implements Comparable
	{
		public var neighbours:int;
		public var parent:BaseTile;
		public var x:int;
		public var y:int;
		public var g:int;
		public var h:int;
		public var marked:Boolean;
		
		public function BaseTile(x:int, y:int, g:int)
		{
			this.x = x;
			this.y = y;
			this.g = g;
		}

		public function compare(arg0:Object):int
		{
			if(this.g+this.h < arg0.g+arg0.h)
				return 1;
			
			if(this.g+this.h > arg0.g+arg0.h)
				return -1;
			
				return 0;		
		}		
	}
}